<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 500px;
            height: 100px;
            /* 必须加浏览器私有前缀 */
            /* background: -webkit-linear-gradient(left, cyan, red); */
            background: -webkit-linear-gradient(top, cyan, red);
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>